Function Ptr (Sel,Off : Longint) : Pointer;
Ptr returns a pointer, pointing to the address specified by segmentSel and offset Off.
Remark 1: In the 32-bit flat-memory model supported by Free Pascal, this function is obsolete.
Remark 2:
The returned address is simply the offset. If you recompile
the RTL with -dDoMapping defined, then the compiler returns the
following : ptr:=pointer($e0000000+sel shl 4+off)
under DOS, or
ptr:=pointer(sel shl 4+off)
on other OSes.
None.
Addr
Program Example59; { Program to demonstrate the Ptr function. } Var P : ^String; S : String; begin S:='Hello, World !'; P:=Ptr(Seg(S),Longint(Ofs(S))); {P now points to S !} Writeln (P^); end.